home *** CD-ROM | disk | FTP | other *** search
- Global aRect:R,TheMouse:L
- on NewXWind rect1,rect2,rect3,rect4,name,WType,ControlID,min,max,now,CRect,CTitle
- global MXW,CID,L,H,N,CRCT,CHandle,CTTL
- put CRect into CRCT
- put min into L
- put max into H
- put now into N
- put ControlID into CID
- SetRect aRect,rect1,rect2,rect3,rect4
- put NewXWindow(aRect,name,true,WType,true,false) into MXW
- end NewXWind
-
-
- on OpenEvent j
- global MXW,CID,L,H,N,CRCT,CHandle,CTTL
- setRect aRect,item 1 of CRCT,item 2 of CRCT,item 3 of CRCT,item 4 of CRCT
- put NewControl (MXW, aRect, CTTL, true, N, L, H, CID, 0) into CHandle
- DrawControls MXW
- end OpenEvent
-
- Global JJ:L,j:L
- on MouseDownEvent ee
- Global CHandle,crct,MXW
- SelectWindow MXW
- DrawControls MXW
- GetPort OldPort
- SetPort MXW
- put ee@.where into jj
- put MXW into temp
- get FindWindow(jj,temp)
- if it = InContent then
- put jj.integerType[1] into j.integerType[2]
- put jj.integerType[2] into j.integerType[1]
- GlobalToLocal j
- put j.integerType[1] into jj.integerType[2]
- put j.integerType[2] into jj.integerType[1]
- put j.integerType[1] into h
- put j.integerType[2] into v
- if (h&","&v) is within crct then
- get TrackControl(Chandle, jj, -1)
- end if
- else if it = inDrag then
- put WMgrPort@.portRect.topLeft into aRect.topleft
- put WMgrPort@.portRect.botRight into aRect.botRight
- DragWindow MXW, jj, aRect
- MoveControl CHandle,1,1
- MoveControl CHandle,0,0
- DrawControls MXW
- else if it = inGoAway then if TrackGoAway(MXW,jj) then CloseXWindow MXW
- SetPort OldPort
- end MouseDownEvent
-
- function CloseEvent J
- global MXW, CHandle
- return true
- end CloseEvent